<style type="text/css">
    .btn-switch{
        padding-bottom: 5px !important;
    }
    .btn-group-tag{
        color:#fff;
        background-color: #ccc;
    }
    .tag-imtem-all{
        padding-left: 20px !important; 
        padding-top: 5px !important;
    }
    .retract-all{
        color: #f63e2c;
    }
    .tag-div-list{
        border: 0.1px solid #ccc;
    }
    .tag-div{
        border-bottom: 0.1px solid #ccc !important;
    }
    .tag-div a{
        color: #000;
    }
    .btn-active{
        background-color: #fff;
        color: #000;
        border: 0.5px solid #ccc;
    }
    .label-item{
        color:#000;
        border:0.5px solid #ccc;
        padding: 0.6em;
        cursor: pointer;
    }
    .label-item-selected{
        background-color: #f63e2c;
    }
    .tag-selected-list{
        height: 300px;
        border: 0.5px solid #ccc;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[user_id]" value="{$user_id}">
    <div class="form-group">
        <div class="p-2 tag-imtem-all">
            <h4 class="display-2"><a href="javascript:void(0);" class="retract-all toggle-up"><i class="fa fa-minus"> 全部收起</i></h4>
        </div>
        <div class="col-xs-12 col-sm-12 tag-list">
            <div class="d-flex flex-column-reverse bd-highlight tag-div-list">
                <div class="p-2 tag-div tag-div-title title-toggle-down"><a href="javascript:void(0);"><i class="fa fa-chevron-up"></i> 充值客户</a></div>
                <div class="p-2 tag-item-list">
                    {volist name="group1" id="vo1"}
                        <span {if in_array($vo1['id'], $usertags)} class="label label-item label-item-selected" {else /} class="label label-item tag-add" {/if} data-id="{$vo1['id']}">{$vo1['name']}</span> 
                    {/volist} 
                    
                </div>
                <div class="p-2 tag-div tag-div-title title-toggle-down"><a href="javascript:void(0);"><i class="fa fa-chevron-up"></i> 客户等级</a></div>
                <div class="p-2 tag-item-list">
                    {volist name="group2" id="vo2"}
                        <span {if in_array($vo2['id'], $usertags)} class="label label-item label-item-selected" {else /} class="label label-item tag-add" {/if} data-id="{$vo2['id']}" data-id="{$vo2['id']}">{$vo2['name']}</span> 
                    {/volist} 
                </div>
                <div class="p-2 tag-div tag-div-title title-toggle-down"><a href="javascript:void(0);"><i class="fa fa-chevron-up"></i> 未分组标签</a>  <button type="button" class="btn btn-success btn-tag-add" data-url="{:url('user/user/addtag')}">新建标签</button></div>
                <div class="p-2 tag-item-list">
                    {volist name="group0" id="vo0"}
                        <span {if in_array($vo0['id'], $usertags)} class="label label-item label-item-selected" {else /} class="label label-item tag-add" {/if} data-id="{$vo0['id']}" data-id="{$vo0['id']}">{$vo0['name']}</span> 
                    {/volist} 
                </div>
            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="p-2 tag-imtem-all">
            <h4 class="display-2"><a href="javascript:void(0);" class="retract-all">已选标签（<span class='tag-count'>{$tagscount}</span>）</h4>
        </div>
        <div class="col-xs-12 col-sm-12">
            <div class="d-flex flex-column-reverse bd-highlight tag-selected-list">
                <div class="p-2">
                    {volist name="usertagslist" id="vo3"}
                        <span class="label label-item" data-id="{$vo3['id']}">{$vo3['name']} <i class="fa fa-close tag-del"></i><input type="hidden" name="row[tag_id][]" value="{$vo3['id']}"></span>
                        
                    {/volist}
                </div>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-4"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
